#include <stdio.h>

//https://www.nowcoder.com/practice/849b9e545f4742398d278f5dc4e003d2?tpId=182&&tqId=34478&rp=1&ru=/ta/exam-all&qru=/ta/exam-all/question-ranking

int isOddCount(int *nums, int numSize) {
    int ret = 0;
    for (int i = 0; i < numSize; i++) {
        ret ^= nums[i];
    }
    return ret;
}


int main() {
    int n = 0;
    int arr[2000000];
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &arr[i]);
    }
    printf("%d", isOddCount(arr, n));
    return 0;
}

